<template>
  <div class="goods-info">
    <div class="goods-image">
      <img v-lazy="goodsImage" width="90%">
    </div>
    <div class="goods-name" v-text="goodsName"></div>
    <div class="goods-price">￥{{goodsPrice|moneyFilter}}</div>
  </div>
</template>

<script lang="ts">
  import Vue from 'vue'
  import {toMoney} from '@/filter/moneyFilter'
  export default Vue.extend({
    props: ['goodsImage','goodsName','goodsPrice'],
    filters:{
      moneyFilter(money:any){
        return toMoney(money)
      }
    }
  })
</script>

<style scoped>
.goods-name{
  padding: 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
</style>